package org.jeecg.modules.bigdatashow.service.impl;

import org.jeecg.modules.bigdatashow.entity.Money;
import org.jeecg.modules.bigdatashow.mapper.MoneyMapper;
import org.jeecg.modules.bigdatashow.entity.Ratio;
import org.jeecg.modules.bigdatashow.service.MoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class MoneyServiceImpl implements MoneyService {
    @Autowired
    MoneyMapper moneyMapper;

    @Override
    public List ruAll(int i) {
        List list=new ArrayList();
   List<Money> moneyList=moneyMapper.find(i);
    String a=moneyMapper.Allmoney(i);
    int cout=moneyMapper.cout(i);
        Ratio ratio1=moneyMapper.findMax(i);
        Ratio ratio2=moneyMapper.findMin(i);

    list.add(a);
    list.add(cout);
    list.add(ratio1);
    list.add(ratio2);
    list.add(moneyList);

        return list;
    }
}
